home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / Hello / Sources / Part.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  2.5 KB  |  101 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Part.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef PART_H
  11. #define PART_H
  12.  
  13. #ifndef DEFINES_K
  14. #include "Defines.k"
  15. #endif
  16.  
  17. // ----- Framework Includes -----
  18.  
  19. #ifndef FWPART_H
  20. #include "FWPart.h"
  21. #endif
  22.  
  23. // ----- OS Layer -----
  24.  
  25. #ifndef FWRESFIL_H
  26. #include "FWResFil.h"
  27. #endif
  28.  
  29. // ----- Foundation Layer -----
  30.  
  31. #ifndef FWSTDDEF_H
  32. #include "FWStdDef.h"
  33. #endif
  34.  
  35. #ifndef FWBNDSTR_H
  36. #include "FWBndStr.h"
  37. #endif
  38.  
  39.  
  40. //========================================================================================
  41. // Forward Declarations
  42. //========================================================================================
  43.  
  44. class CHelloContent;
  45.  
  46. //========================================================================================
  47. // CHelloPart
  48. //========================================================================================
  49.  
  50. class CHelloPart : public FW_CPart
  51. {
  52. //----------------------------------------------------------------------------------------
  53. //    Initialization/Destruction
  54. //
  55. public:
  56.  
  57.     FW_DECLARE_AUTO(CHelloPart)
  58.     
  59.     CHelloPart(ODPart* odPart);
  60.     virtual ~CHelloPart();
  61.  
  62.     virtual void Initialize(Environment* ev, ODStorageUnit* storageUnit, FW_Boolean fromStorage);
  63.  
  64. //----------------------------------------------------------------------------------------
  65. //    Inherited API
  66. //
  67. public:
  68.     virtual FW_CContent*        NewPartContent(Environment* ev);
  69.  
  70.     virtual FW_CFrame*            NewFrame(Environment* ev,
  71.                                      ODFrame* odFrame,
  72.                                      FW_CPresentation* presentation,
  73.                                      FW_Boolean fromStorage);
  74.  
  75.     virtual FW_Handled            DoAdjustMenus(Environment* ev,
  76.                                     FW_CMenuBar* menuBar, 
  77.                                     FW_Boolean hasMenuFocus,
  78.                                     FW_Boolean isRoot);
  79.  
  80.     virtual FW_Handled            DoMenu(Environment* ev,
  81.                                       const FW_CMenuEvent& theMenuEvent);
  82.  
  83.     virtual FW_Handled            DoAbout(Environment* ev);
  84.     
  85. //----------------------------------------------------------------------------------------
  86. //    New API
  87. //
  88. public:
  89.     void                    PartChanged(Environment* ev, FW_Boolean invalidateOnly);
  90.         // Call this after changing part data, to notify the proper authorities
  91.  
  92. //----------------------------------------------------------------------------------------
  93. //    Data Members
  94. //
  95. private:
  96.     CHelloContent*            fPartContent;
  97.     FW_CPresentation*        fPresentation;
  98. };
  99.  
  100. #endif
  101.